//
//  WCSaveTool.h
//  WonderCommon
//
//  Created by zero on 2021/8/18.
//

#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN

extern NSString * const COMMON_KEY_USER_UUID;
extern NSString * const COMMON_KEY_USER_OPENID;
extern NSString * const COMMON_KEY_USER_MONEY;

extern NSString * const COMMON_KEY_DEVICE_IDFA;
extern NSString * const COMMON_KEY_PAY_NotExpend_ID;

@interface WCSaveTool : NSObject

+ (instancetype)sharedTool;


/// 保存信息到 Keychain
/// @param data 信息
/// @param key key
- (void)saveData:(id)data AndKey:(NSString *)key;


/// 从 Keychain 获取信息
/// @param key key
- (id)getDataWithKey:(NSString *)key;


/// 删除 Keychain 对应的信息
/// @param key key
- (void)deleteDataWithKey:(NSString *)key;


/// 保存信息到 缓存 中
/// @param key key
/// @param data 信息
- (void)saveDataToUserDefaultsWithKey:(NSString *)key Data:(id)data;


/// 从缓存中 获取信息
/// @param key key
- (id)getDataToUserDefaultsWithKey:(NSString *)key;


/// 从缓存中 删除信息
/// @param key key
- (void)deleteDataToUserDefaultsWithKey:(NSString *)key;

@end

NS_ASSUME_NONNULL_END
